﻿@{
    Layout = "";
}
@model ConfigurationModel
@using Nop.Plugin.Payments.PayU_ZA.Models;
@using Nop.Web.Framework;
@Html.Action("StoreScopeConfiguration", "Setting", new { area = "Admin" })

@*<script type="text/javascript">
    $(document).ready(function () {

        $("#@Html.FieldIdFor(model => model.EnableIpn)").click(toggleEnableIpn);

        toggleEnableIpn();
    });


    function toggleEnableIpn() {
        if ($('#@Html.FieldIdFor(model => model.EnableIpn)').is(':checked')) {
	        $('#pnlIpnUrl').show();
	    }
	    else {
	        $('#pnlIpnUrl').hide();
	    }
	}


</script>*@

@using (Html.BeginForm()) {
    <table class="adminContent">
        <tr>
            <td colspan="2">
                <b>This plug-in is only for use with <a href="http://www.payu.co.za">PayU</a> in South Africa </b>
                <br />
            </td>
        </tr>
        <tr>
            <td colspan="2" width="100%">
                <hr />
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.UseSandbox_OverrideForStore, model => model.UseSandbox, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.UseSandbox):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.UseSandbox)
                @Html.ValidationMessageFor(model => model.UseSandbox)
            </td>
        </tr>

        <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.Safekey_OverrideForStore, model => model.Safekey, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.Safekey):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Safekey)
                @Html.ValidationMessageFor(model => model.Safekey)
            </td>
        </tr>

                <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.UserName_OverrideForStore, model => model.UserName, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.UserName):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.UserName)
                @Html.ValidationMessageFor(model => model.UserName)
            </td>
        </tr>

                <tr>
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.Password_OverrideForStore, model => model.Password, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.Password):
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.Password)
                @Html.ValidationMessageFor(model => model.Password)
            </td>
        </tr>

        <tr id="pnlIpnUrl">
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.IpnUrl_OverrideForStore, model => model.IpnUrl, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.IpnUrl):
              
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.IpnUrl)
                @Html.ValidationMessageFor(model => model.IpnUrl)
            </td>
        </tr>

        <tr >
            <td class="adminTitle">
                @Html.OverrideStoreCheckboxFor(model => model.PaymentMethods_OverrideForStore, model => model.PaymentMethods, Model.ActiveStoreScopeConfiguration)
                @Html.NopLabelFor(model => model.PaymentMethods):
              
            </td>
            <td class="adminData">
                @Html.EditorFor(model => model.PaymentMethods)
                @Html.ValidationMessageFor(model => model.PaymentMethods)
            </td>
        </tr>
        <tr>
            <td colspan="2" width="100%">
                <input type="submit" name="save" class="t-button" value="@T("Admin.Common.Save")" />
            </td>
        </tr>
    </table>
    
}